/******************************************************************************/
/*  POB-Technology 2005                                                       */
/*                                                                            */
/* File : POBLCD128E1.c                                                       */
/* Author : Pierre Seguin                                                     */
/*                                                                            */
/* This file is an example to draw in the POB-LCD128 screen                   */
/*                                                                            */
/******************************************************************************/


#include <pob-eye.h>


#include "Bitmap.h"  /* include bitmap list */


int main (void)
{
	UInt8 LCD_Buffer [LCD_WIDTH*LCD_HEIGHT*BITS] ; /* where the pixels will be stocked */
	GraphicBuffer ScreenBuffer ; /* buffer screen */


	InitPOBEYE(); /* POB-EYE init */
	InitLCD();    /* LCD screen init */
	
	/* init the Graphic buffer with 128 per 64, one pixel per bit and LCD_Buffer */
	InitGraphicBuffer( &ScreenBuffer, LCD_WIDTH,LCD_HEIGHT,ONE_BIT,LCD_Buffer);

	/* clear the graphic buffer */
	ClearGraphicBuffer(&ScreenBuffer);

	/* draw bitmap */
	DrawBitmap(30,10,IDB_1,Bitmap,&ScreenBuffer);
	DrawBitmap(45,10,IDB_2,Bitmap,&ScreenBuffer);
	DrawBitmap(65,10,IDB_3,Bitmap,&ScreenBuffer);

	/* draw line  */
	DrawLine(10,10,25,30,&ScreenBuffer);

	/* draw a point */
	PlotAPoint(20,10,&ScreenBuffer);
	
	/* draw graphic buffer on the LCD screen */
	DrawLCD(&ScreenBuffer);
	
	
	return 0;
}
